package ift604.projet.feeling;

import java.util.ArrayList;

import android.graphics.Color;

public class Feeling {
	private String name;
	private String stereoMoodName;
	private int color;

	public int getColor() {
		return color;
	}

	public Feeling(String name, String stereoMoodName, int color) {
		this.name = name;
		this.stereoMoodName = stereoMoodName;
		this.color = color;
	}

	public String getName(){
		return name;
	}

	public String nameForStereoMood(){
		return stereoMoodName;
	}
	
	
	@SuppressWarnings("serial")
	public static ArrayList<Feeling> feelings = new ArrayList<Feeling>(){
		{
			add(new Feeling("SERENITY", "calm", Color.rgb(247, 249, 174)));
			add(new Feeling("JOY", "happy", Color.rgb(244, 250, 78)));
			add(new Feeling("ECSTACY", "in%20love", Color.rgb(246, 231, 78)));
			add(new Feeling("ACCEPTANCE", "untroubled", Color.rgb(136, 250, 136)));
			add(new Feeling("TRUST", "cool", Color.rgb(78, 250, 78)));
			add(new Feeling("ADMIRATION", "romantic", Color.rgb(0, 179, 2)));
			add(new Feeling("APPREHESION", "spooky", Color.rgb(134, 195, 134)));
			add(new Feeling("FEAR", "worried", Color.rgb(0, 147, 1)));
			add(new Feeling("TERROR", "aggressive", Color.rgb(10, 122, 0)));
			add(new Feeling("DISTRACTION", "sloth", Color.rgb(159, 214, 245)));
			add(new Feeling("SURPRISE", "funky", Color.rgb(86, 186, 246)));
			add(new Feeling("AMAZEMENT", "psychedelic", Color.rgb(0, 134, 221)));
			add(new Feeling("PENSIVENESS", "dreamy", Color.rgb(134, 138, 246)));
			add(new Feeling("SADNESS", "sad", Color.rgb(78, 79, 244)));
			add(new Feeling("GRIEF", "melancholy", Color.rgb(1, 0, 198)));
			add(new Feeling("BOREDOM", "lonely", Color.rgb(245, 195, 245)));
			add(new Feeling("DISGUST", "spooky", Color.rgb(245, 84, 242)));
			add(new Feeling("LOATHING", "sleepy", Color.rgb(211, 1, 211)));
			add(new Feeling("ANNOYANCE", "sad", Color.rgb(249, 136, 136)));
			add(new Feeling("ANGER", "angry", Color.rgb(249, 0, 3)));
			add(new Feeling("RAGE", "absolutely%20mad", Color.rgb(205, 0, 0)));
			add(new Feeling("INTEREST", "optimistic", Color.rgb(245, 195, 136)));
			add(new Feeling("ANTICIPATION", "well-read", Color.rgb(246, 166, 79)));
			add(new Feeling("VIGILANCE", "crazy", Color.rgb(246, 122, 0)));
		}
	};

	public static Feeling getFeelingFromName(String name) {
		for (Feeling feeling: feelings) {
			if (feeling.getName().equalsIgnoreCase(name)) {
				return feeling;
			}
		}
		return null;
	}
}
